local template = {}

template.SCRIPT = {
   "prettify.js",
   "lang-lua.js",
   "report.js"
}

template.STYLE = {
   "report.css"
}

-- luacheck: ignore 631
template.HTML_HEADER = [[
<!doctype html>
<html lang="en">
<head>
   <meta charset="utf-8" />
   <title>Code coverage report</title>
   <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
   <link rel="shortcut icon" type="image/png" sizes="16x16" href="" />
{{style}}
</head>
<body onload="initialize()">
   <main>
]]

template.HTML_FOOTER = [[
   </main>
   <footer>
        Code coverage generated by <a href="https://lunarmodules.github.io/luacov/" target="_blank">LuaCov</a> at {{timestamp}}
   </footer>
{{script}}
</body>
</html>
]]

template.HTML_TOTAL = [[
      <div class="file {{css_class}} total">
         <h1 class="title">
            Code coverage report
            <span class="stats">
               <span class="cov">
                  <span class="bg" style="width: {{coverage}}%"></span>
                  <span><strong>{{coverage}}%</strong> Coverage</span>
               </span>
               <span class="hits"><strong>{{hits}}</strong> Hits</span>
               <span class="miss"><strong>{{miss}}</strong> Missed</span>
            </span>
         </h1>
      </div>

]]

template.HTML_FILE_HEADER = [[
      <div class="hidden file {{css_class}}" id="{{id}}">
         <h2 class="title">
            {{filename}}
            <span class="stats">
               <span class="cov">
                  <span class="bg" style="width: {{coverage}}%"></span>
                  <span><strong>{{coverage}}%</strong> Coverage</span>
               </span>
               <span class="hits"><strong>{{hits}}</strong> Hits</span>
               <span class="miss"><strong>{{miss}}</strong> Missed</span>
            </span>
         </h2>
         <pre class="prettyprint lang-lua linenums">]]

template.HTML_FILE_FOOTER = [[</pre>
      </div>

]]

template.HTML_LINE_HIT = [[<span class="fc" data-hits="{{hits}}">{{line}}</span>]] .. "\n"
template.HTML_LINE_MIS = [[<span class="nc">{{line}}</span>]] .. "\n"

return template
